package calvin.study.springboot.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import calvin.study.springboot.model.Pet;

@Configuration
public class MyConfig3 {
	
	@ConditionalOnBean(name="pet")
	public Pet pet() {
		return new Pet("tomcat", 3);
	}
	
	public Pet pet2() {
		return new Pet("tomcat", 3);
	}

}
